package com.changgou;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test {
    @Autowired
    RedisTemplate redisTemplate;

    @Test
    public void test(){
        List itcast = redisTemplate.boundHashOps("itcast").values();
        String s = JSON.toJSONString(itcast);
        System.out.println(s);
    }
}
